package com.lhy;

public class Test63<T> {
    private T t;
    public T getT() {   //get方法
        return t;
    }
    public void setT(T t) {//set方法
        this.t = t;
    }
    public static void main(String[] args) {
        Test63<Integer> integerTest63 = new Test63<>();
        Test63<String> stringTest63 = new Test63<>();
        integerTest63.setT(new Integer(10));
        stringTest63.setT(new String("砂糖"));
        System.out.printf("int类型的值为：%d\n",integerTest63.getT());
        System.out.printf("String类型值为：%s\n",stringTest63.getT());
    }
}
